package kr.hkit.powerjava.chapter11;

import java.lang.reflect.Field;
import java.lang.reflect.Method;


public class ObjTest {
	public static void main(String[] args) {
		Car car = new Car();
		System.out.println(car.getClass().getName());

		Method[] m = car.getClass().getDeclaredMethods();
		for(Method method:m) {
			System.out.println("메소드명"+method.getName());
			System.out.println("접근자"+method.getModifiers());
			
		}
		
		Field[] arrField = car.getClass().getDeclaredFields();
		for(Field f : arrField) {
			System.out.println("필드명 :"+f.getName());
			System.out.println("접근지정자"+f.getModifiers());
		}
	}

}
